<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>debug - WebIM</title>
</head>
<body>
receiver: <input type="text" id="receiver" value="127646892"/>
message: <input type="text" id="message" value="hello"/>
<a id="sendbtn" href="#nogo">send</a>

<script type="text/javascript">
window.g_is_mobile_client = false;
window.g_client_type = 'web';
window.g_load_balance_key = (new Date()).getTime() % 100;
window.MAX_SUB_CHANNEL_KEY = 99;
window.CHANNEL_LIST = [1];
</script>
<script type="text/javascript" src="http://imstatic.bang.360.cn/js/jquery_plugin/jquery.js"></script>
<script type="text/javascript" src="http://imstatic.bang.360.cn/chat-channel.js?r=3"></script>

<script type="text/javascript">
/*
 * Author: yuwei.mu@gmail.com
 * Date: 2013-05
*/ 

function Bootstrap() {
  var ajax_channel = new AjaxChannel('/subscribe', '/publish');
  // var qihu_channel = new QihuChannel(ajax_channel);
  var mutex_channel = new MutexAjaxChannel(ajax_channel);
  var qihu_channel = new QihuChannel(mutex_channel);

  // var controller = new ChatController(ajax_channel);
  // var controller = new ChatController(mutex_channel);
  var controller = new ChatController(qihu_channel);

  controller.AttachView('debug', new DebugView()); 
  controller.StartReceiveMessage();

  window.g_controller = controller;
}

$(document).ready(function() {
  if (window.logger && logger.show) {
    logger.show();
  }
  // AjaxChannelUnitTest(500);
  // StorageQueueUnitTest(500);
  // QihuChannelUnitTest(500);
  Bootstrap();

  $('#sendbtn').click(function() {

      $.ajax({
          url: "http://v2.jishi.360.cn/bbt/engineer/detail?e=3007",
          type: 'GET',
          dataType : 'text',
          success : function(rsp_txt) {
            logger.debug(rsp_txt);
          });
//    g_controller.SendMessage($("#receiver").val(), $("#message").val());
  });
});



</script>
<div id="channel_border" style="display:none"></div>
</body>
</html>
